package com.misc.tunewsreader;

public class ListEntry implements ListItem {

    public final String title;
    public final String full_name;
    public final int count;

    public ListEntry(String title, String full_name) {
	this.title = title;
	this.full_name = full_name;
	this.count = 0;
    }

    public ListEntry(String title, String full_name, int count) {
	this.title = title;
	this.full_name = full_name;
	this.count = count;
    }

    @Override
    public boolean isSection() {
	return false;
    }

    @Override
    public boolean matchesFilter(CharSequence prefix) {
	if (full_name.toLowerCase().contains(
		prefix.toString().toLowerCase().trim())
		|| title.toLowerCase().contains(
			prefix.toString().toLowerCase().trim())) {
	    return true;
	} else
	    return false;
    }

}
